import Vue from 'vue'
import VueRouter from 'vue-router'
import Login from '../components/Login.vue'
import Home from '../components/Home.vue' 
import Welcome from '../components/Welcome.vue'
import UserList from '../components/admin/UserList.vue'
import ccCustomerDataConfig from '../components/admin/cc-customer-data-config.vue'
import ccCustomerSubConfig from '../components/admin/cc-customer-sub-config.vue'
import ccCustomerLabel from '../components/admin/cc-customer-label.vue'
import ccCustomerDataManage from '../components/admin/cc-customer-data-manage.vue'
import popSessionInfo from '../components/admin/pop-session-info.vue'

Vue.use(VueRouter)

const routes = [
  {
    path: "/",
    redirect:"/login"
  },
  {
    path: "/login",
    component: Login
  },
  {
    path: "/",
    redirect:"/home"
  },
  {
	name: "/popInfo",
    path: "/popInfo",
    component: popSessionInfo
  },
  {
    path:"/home",
    component: Home,
    redirect:"/welcome",
    children:[
      {path:"/welcome",component: Welcome},
      {path:"/user",component: UserList},
	  {path:"/cc-customer-data-config",component: ccCustomerDataConfig},
	  {path:"/cc-customer-sub-config",component: ccCustomerSubConfig},
	  {path:"/cc-customer-label",component: ccCustomerLabel},
	  {path:"/cc-customer-data-manage",component: ccCustomerDataManage},
	  {path:"/pop-session-info",component: popSessionInfo}
    ]
  },
]

const router = new VueRouter({
  routes
})

export default router
